package exo1;

/**
 * Created with IntelliJ IDEA.
 * User: naberrad
 * Date: 14/10/13
 * Time: 13:53
 * To change this template use File | Settings | File Templates.
 */
public class Rectangle extends Shape2D {

    private double length;
    private double width;

    public Rectangle(double length, double width) {
        this.length = length;
        this.width = width;
    }

    public double getLength() {
        return length;
    }

    public double getWidth() {
        return width;
    }


    @Override
    public double perimeter() {
        double p;
        p = this.length * 2 + this.width * 2;
        return p;
    }

    @Override
    public double surface() {
        double s;
        s = this.length * this.width;
        return s;
    }

}
